feat(logs): extract forwarded_by attribute from syslog message body#1802
Merged
Conversation
Logs forwarded via Logstash have 'forwarded_by=octobus_logstash' appended to the message body. This adds a transform processor that: 1. Detects the marker in attributes["message"] or body 2. Sets attributes["forwarded_by"] = "octobus_logstash" 3. Strips the marker text from both message and body This allows filtering/querying on the forwarded_by attribute in OpenSearch without relying on full-text search of the message field.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new syslog transform processor in the external collector to extract the forwarded_by=octobus_logstash marker into a structured attributes["forwarded_by"] field and remove the marker from log message fields, enabling filtering without full-text search.
Changes:
- Bumps the logs plugin and Helm chart versions to ship the updated syslog pipeline configuration.
- Inserts
transform/syslog_forwarded_byinto all three external-collector syslog pipelines (TCP, UDP, TCP+TLS). - Defines the new
transform/syslog_forwarded_byprocessor to setattributes["forwarded_by"]and strip the marker fromattributes["message"]andbody.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| logs/plugindefinition.yaml | Bumps plugin and chart versions to publish the change. |
| logs/charts/Chart.yaml | Bumps Helm chart version. |
| logs/charts/templates/_syslog-config.tpl | Adds the new transform processor into the syslog pipelines’ processor chain. |
| logs/charts/templates/_syslog-audit-filter-config.tpl | Introduces the transform/syslog_forwarded_by processor logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
melvinsimmert
approved these changes
Jul 8, 2026
Kuckkuck
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transform/syslog_forwarded_byprocessor to the external-collector syslog pipelines that extractsforwarded_by=octobus_logstashfrom the message body into a proper structured attributeattributes["message"]andbodyto keep log messages cleanContext
Logs forwarded via the octobus Logstash relay have
forwarded_by=octobus_logstashappended to the syslog message body (the only way to pass metadata with alinecodec over TCP). This makes it impossible to filter/query on this field without full-text search.This processor:
attributes["message"](primary) orbody(fallback for unparsed logs)attributes["forwarded_by"] = "octobus_logstash"as a structured attributePipeline placement
Runs after the early drop filters (to avoid processing logs that will be discarded) and before user extraction/hostname parsing (so the marker doesn't interfere with other parsers):
Applied to all three syslog pipelines: TCP, UDP, and TCP+TLS.